<?php 

	if(file_exists('functions.php')) {
      	require_once 'functions.php';
   	}

	if(!isset($_SESSION['isLogged'])) {
       	header("Location: login.php");
        exit;
    }

    $q = "SELECT traktor_id, image, model, price FROM traktor";
	$result = mysqli_query($db, $q);

	# set data
	$data['traktors'] = $result;

	render($data, 'layouts/traktorSystem_layout.php');